package com.stedu.mall.common.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

//表示用户的实体类
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private Integer id; //ID
    private String username; //账号
    private String password; //密码 MD5加密
    private String payPassword; //支付密码
    @JsonIgnore
    private String salt; //盐
    private String realname; //真实姓名
    private String sex; //性别
    private String idCard; //身份证号
    private String phone; //电话
    private String email; //邮箱
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date regTime; //注册时间
    private BigDecimal money; //余额
    private Integer status; //0：未认证 1：已认证 2：禁用 3：注销
}
